import request from '@/utils/request'

// 查询我的待阅列表
export function listMessage(query) {
  return request({
    url: '/spsMyInfo/message/list',
    method: 'get',
    params: query
  })
}

// 查询我的待阅详细
export function getMessage(ctId) {
  return request({
    url: '/spsMyInfo/message/' + ctId,
    method: 'get'
  })
}

// 新增我的待阅
export function addMessage(data) {
  return request({
    url: '/spsMyInfo/message',
    method: 'post',
    data: data
  })
}

// 修改我的待阅
export function updateMessage(data) {
  return request({
    url: '/spsMyInfo/message/edit',
    method: 'post',
    data: data
  })
}


// 将待阅信息设置为已读
export function setFinishMessage(data) {
  return request({
    url: '/spsMyInfo/message/setFinish',
    method: 'post',
    data: data
  })
}


// 删除我的待阅
export function delMessage(ctId) {
  return request({
    url: '/spsMyInfo/message/delete/' + ctId,
    method: 'post'
  })
}

// 导出我的待阅
export function exportMessage(query) {
  return request({
    url: '/spsMyInfo/message/export',
    method: 'get',
    params: query
  })
}

// 导出我的待阅
export function readRecord(query) {
  return request({
    url: '/spsMyInfo/message/getReadRecord',
    method: 'get',
    params: query
  })
}
